package com.xlh.dto.course;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * ztree
 * <p>
 * Created by lx on 2019/3/22.
 */
@Data
public class ZtreeDTO {

    @ApiModelProperty(value = "id")
    private Long id;

    @ApiModelProperty(value = "名称")
    private String name;

    @ApiModelProperty(value = "名称")
    private String label;

    @ApiModelProperty(value = "编号")
    private String number;

    @ApiModelProperty(value = "类型")
    private Integer type;

    @JsonIgnore
    @ApiModelProperty(value = "课程id")
    private Long courseId;

    @ApiModelProperty(value = "子级")
    private List<ZtreeDTO> children;

    @ApiModelProperty(value = "是否已存在 true：已存在 false/null：不存在")
    private Boolean existed;

    public String getLabel() {
        return name;
    }
}
